# -*- coding: utf-8 -*-

tasks = -> environment, default_task {
  FileList["tasks/#{environment}/**/*.rake"].each(&method(:import))
  task :default => default_task
}

case ENV['ENUMERABLE_RB_ENV']
when "development", nil then tasks.call "development", "test"
when "production" then tasks.call "production", "production:run"
else
  $stderr.puts "ERROR: there are no tasks for that environment"
  exit 1
end
